//
//  XMButton.h
//  XMButton
//
//  Created by chenming on 2017/12/7.
//  Copyright © 2017年 ChenXiaoMing. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, XMButtonImageOrientationType) {
    XMButtonImageOrientationLeft = 0, // 图片在左
    XMButtonImageOrientationRight = 1, // 图片在右
    XMButtonImageOrientationTop = 2, // 图片在上
    XMButtonImageOrientationBottom = 3, // 图片在下
};

@interface XMButton : UIButton

+ (instancetype)initWithFrame:(CGRect)frame buttonWithType:(UIButtonType)buttonType;

@property (nonatomic, assign) XMButtonImageOrientationType imageOrientationType;

/** 文字图片偏移量 */
@property (nonatomic, assign) CGFloat offset;

/** titleLabel大小 */
@property (nonatomic, strong) UIFont *font;

/** titleLabel颜色 */
@property (nonatomic, strong) UIColor *titleColor;

/** titleLabel宽度 */
@property (nonatomic, assign) CGSize titleLabelContentSize;

/** 按钮响应事件 */
@property (nonatomic, copy) dispatch_block_t btnClick;

@end
